package com.wing.member.model.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.wing.mybatis.common.BaseEntity;
import lombok.Data;

/**
 * 用户关系(闭包)
 *
 * @author
 */
@Data
@TableName("mem_member_relation")
public class MemberRelation extends BaseEntity<MemberRelation> {

    /**
     * 祖先节点ID
     *
     */
    private Long ancestor;

    /**
     * 后代节点ID
     *
     */
    private Long descendant;

    /**
     * 祖先距离后代的距离
     *
     */
    private int distance;

    public MemberRelation(){}

    public MemberRelation(Long ancestor, Long descendant, int distance){
        this.ancestor = ancestor;
        this.descendant = descendant;
        this.distance = distance;
    }
}
